package com.tjsoft.system.entity.base;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import com.tjsoft.system.entity.IdEntity;

/**
 * 微型企业自有资金使用情况表
 * @author Administrator
 *
 */
@Entity
@Table(name = "T_SYS_SelfMoney")
public class Selfmoney extends IdEntity {
	@ManyToOne
	@JoinColumn(name="comp_id")
	private Comp comp;//企业名称
	@OneToMany(mappedBy="selfmoney")
	//@JoinColumn(name="selfmoney_id")
	@Cascade(value={CascadeType.DELETE})
	private List<Moneyitem> items ;
	private String chief;//负责人
	@Temporal(TemporalType.DATE)
	private Date qianzhiDate;//签字时间
	
	private double totalMoney;
	
	public Comp getComp() {
		return comp;
	}
	public void setComp(Comp comp) {
		this.comp = comp;
	}
	public List<Moneyitem> getItems() {
		return items;
	}
	public void setItems(List<Moneyitem> items) {
		this.items = items;
	}
	public String getChief() {
		return chief;
	}
	public void setChief(String chief) {
		this.chief = chief;
	}
	public Date getQianzhiDate() {
		return qianzhiDate;
	}
	public void setQianzhiDate(Date qianzhiDate) {
		this.qianzhiDate = qianzhiDate;
	}
	public double getTotalMoney(){
		return totalMoney;
	}
	public void setTotalMoney(double totalMoney){
		this.totalMoney = totalMoney;
	}
}
